<script setup>
  import {reactive} from 'vue'

  let person = reactive({
    name:'张三',
    age:23,
    hobbies:['篮球', '足球']
  });

  let fun = function(){
    console.log(person.age)
    person.age++;
  }

</script>

<template>
  <div>
    <input type="button" v-bind:value="'年纪加一'" v-on:click="fun()"/>：{{ person.age }}
    <input type="button" v-bind:value="'年纪加一'" v-on:click="person.age++"/>：{{ person.age }}
  </div>
</template>

<style scoped>

</style>
